package com.dream.springmvc.value;

import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author zhaoshichang
 */
@Data
@AllArgsConstructor
public class SingleSelectValue implements Value<String> {
    private String optionId;

    @Override
    public String getValue() {
        return optionId;
    }

    @JsonCreator
    public static SingleSelectValue fromJson(String val) {
        return new SingleSelectValue(val);
    }
}
